import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {



    //比那名居的桃子
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        long[] a = new long[n];
        long[] b = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextLong();
        }
        for (int i = 0; i < n; i++) {
            b[i] = in.nextLong();
        }
        int left = 0;
        int right = 0;
        long hSum = 0;
        long sSum = 0;
        long hMax = 0;
        long sMin = 0;
        long begin = 0;
        while(right < n){
            hSum+=a[right];
            sSum+=b[right];
            while(right-left+1>k){
                hSum -=a[left];
                sSum -=b[left];
                left++;
            }
            if(right-left+1 == k){
                if(hSum>hMax){
                    begin = left;
                    hMax = hSum;
                    sMin = sSum;
                }else if(hSum == hMax && sMin > sSum){
                    begin = left;
                    sMin = sSum;
                }
            }
            right++;
        }
        System.out.println(begin+1);
    }








    //十字爆破
    public  static Read in = new Read();
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static void main2(String[] args)throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        long[][] arr = new long[n][m];
        long[] row = new long[n];
        long[] col = new long[m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                arr[i][j] = in.nextInt();
                row[i] += arr[i][j];
                col[j] += arr[i][j];
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                out.print((row[i]+col[j]-arr[i][j])+" ");
            }
            out.println();
        }
        out.close();
    }
    public static class Read{
        StringTokenizer st = new StringTokenizer("");
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String next() throws IOException{
            while(!st.hasMoreTokens()){
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }
        String nextLine() throws IOException{
            return  bf.readLine();
        }
        int nextInt() throws IOException{
            return Integer.parseInt(next());
        }
        long nextLong() throws IOException{
            return Long.parseLong(next());
        }
    }










    //小乐乐改数字
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String str = String.valueOf(n);
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < str.length(); i++) {
            int a = Integer.parseInt(String.valueOf(str.charAt(i)));
            if(a%2 == 0){
                sb.append(0);
            }else sb.append(1);
        }
        str = sb.toString();
        System.out.println(Integer.parseInt(str));
    }

































}
